package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import com.hq.utils.util.StringUtils;
import com.hq.web.inf.serial.ISerialNumber;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 编号表
 */
@Data
@Alias("SerialNumber")
@TableName(value = "serial_number")
@ApiModel(value = "编号表")
public class SerialNumber extends BaseModel<SerialNumber> implements Serializable, ISerialNumber {

    @ApiModelProperty(value = "创建时间 - 不需程序员处理")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "当前sn")
    @TableField(value = "`current_sn`")
    private Integer currentSn;

    @ApiModelProperty(value = "天在java里格式化样式")
    @TableField(value = "`day_style`")
    private String dayStyle;

    @ApiModelProperty(value = "小时在java里格式化样式")
    @TableField(value = "`hour_style`")
    private String hourStyle;

    @ApiModelProperty(value = "主键")
    @TableId(value = "`id`", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_delete`")
    private Boolean isDelete;

    @ApiModelProperty(value = "是否需要天")
    @TableField(value = "`is_need_day`")
    private Boolean isNeedDay;

    @ApiModelProperty(value = "是否需要小时")
    @TableField(value = "`is_need_hour`")
    private Boolean isNeedHour;

    @ApiModelProperty(value = "是否需要分钟")
    @TableField(value = "`is_need_minute`")
    private Boolean isNeedMinute;

    @ApiModelProperty(value = "是否需要月份")
    @TableField(value = "`is_need_month`")
    private Boolean isNeedMonth;

    @ApiModelProperty(value = "是否需要前缀")
    @TableField(value = "`is_need_prefix`")
    private Boolean isNeedPrefix;

    @ApiModelProperty(value = "是否需要秒")
    @TableField(value = "`is_need_second`")
    private Boolean isNeedSecond;

    @ApiModelProperty(value = "是否需要序号")
    @TableField(value = "`is_need_sn`")
    private Boolean isNeedSn;

    @ApiModelProperty(value = "是否需要年份")
    @TableField(value = "`is_need_year`")
    private Boolean isNeedYear;

    @ApiModelProperty(value = "连接符号")
    @TableField(value = "`joiner_fh`")
    private String joinerFh;

    @ApiModelProperty(value = "分钟在java里格式化样式")
    @TableField(value = "`minute_style`")
    private String minuteStyle;

    @ApiModelProperty(value = "月份在java里格式化样式")
    @TableField(value = "`month_style`")
    private String monthStyle;

    @ApiModelProperty(value = "前缀标识")
    @TableField(value = "`prefix`")
    private String prefix;

    @ApiModelProperty(value = "秒在java里格式化样式")
    @TableField(value = "`second_style`")
    private String secondStyle;

    @ApiModelProperty(value = "序号保留长度")
    @TableField(value = "`sn_len`")
    private Integer snLen;

    @ApiModelProperty(value = "在java中必须存在的唯一标识")
    @TableField(value = "`unique_key`")
    private String uniqueKey;

    @ApiModelProperty(value = "更新时间 - 不需程序员处理")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`update_date_time`", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "乐观锁 - 不需程序员处理")
    @Version
    @TableField(value = "`version`", fill = FieldFill.INSERT)
    private Integer version;

    @ApiModelProperty(value = "年份在java里格式化样式")
    @TableField(value = "`year_style`")
    private String yearStyle;

    @Override
    public String getSiteCompanyId() {
        return StringUtils.EMPTY;
    }

    @Override
    public String getPingYinLong() {
        return StringUtils.EMPTY;
    }

    @Override
    public String getPingYinShort() {
        return StringUtils.EMPTY;
    }
}
